#ifndef SPL_H
#define SPL_H

typedef struct SPLPortable {
    void (*print)(const char *message);
    void (*flash_unlock)(void);
    void (*flash_lock)(void);
    void (*flash_erase)(void *address,unsigned int size);
    void (*flash_copy)(void *dest,void *src,unsigned int size);
    void (*firmware_load)(void *address);
} SPLPortable_t;

#ifdef __cplusplus
extern "C" {
#endif

void SPL_run(SPLPortable_t portable);

#ifdef __cplusplus
}
#endif

#endif